3.1.72 \(\int \sin (a+b x) \tan ^2(a+b x) \, dx\) [72]

Optimal. Leaf size=21 \[ \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \]

[Out]

cos(b*x+a)/b+sec(b*x+a)/b

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2670, 14} \begin {gather*} \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]*Tan[a + b*x]^2,x]

[Out]

Cos[a + b*x]/b + Sec[a + b*x]/b

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2670

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rubi steps

\begin {align*} \int \sin (a+b x) \tan ^2(a+b x) \, dx &=-\frac {\text {Subst}\left (\int \frac {1-x^2}{x^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac {\text {Subst}\left (\int \left (-1+\frac {1}{x^2}\right ) \, dx,x,\cos (a+b x)\right )}{b}\\ &=\frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 21, normalized size = 1.00 \begin {gather*} \frac {\cos (a+b x)}{b}+\frac {\sec (a+b x)}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]*Tan[a + b*x]^2,x]

[Out]

Cos[a + b*x]/b + Sec[a + b*x]/b

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 40, normalized size = 1.90

method result size
norman \(-\frac {4}{b \left (1+\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right ) \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )}\) \(36\)
derivativedivides \(\frac {\frac {\sin ^{4}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (2+\sin ^{2}\left (b x +a \right )\right ) \cos \left (b x +a \right )}{b}\) \(40\)
default \(\frac {\frac {\sin ^{4}\left (b x +a \right )}{\cos \left (b x +a \right )}+\left (2+\sin ^{2}\left (b x +a \right )\right ) \cos \left (b x +a \right )}{b}\) \(40\)
risch \(\frac {{\mathrm e}^{i \left (b x +a \right )}}{2 b}+\frac {{\mathrm e}^{-i \left (b x +a \right )}}{2 b}+\frac {2 \,{\mathrm e}^{i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}\) \(57\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+a)^2*sin(b*x+a)^3,x,method=_RETURNVERBOSE)

[Out]

1/b*(sin(b*x+a)^4/cos(b*x+a)+(2+sin(b*x+a)^2)*cos(b*x+a))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 19, normalized size = 0.90 \begin {gather*} \frac {\frac {1}{\cos \left (b x + a\right )} + \cos \left (b x + a\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^3,x, algorithm="maxima")

[Out]

(1/cos(b*x + a) + cos(b*x + a))/b

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 22, normalized size = 1.05 \begin {gather*} \frac {\cos \left (b x + a\right )^{2} + 1}{b \cos \left (b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^3,x, algorithm="fricas")

[Out]

(cos(b*x + a)^2 + 1)/(b*cos(b*x + a))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)**2*sin(b*x+a)**3,x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [A]
time = 5.70, size = 23, normalized size = 1.10 \begin {gather*} \frac {\cos \left (b x + a\right )}{b} + \frac {1}{b \cos \left (b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^3,x, algorithm="giac")

[Out]

cos(b*x + a)/b + 1/(b*cos(b*x + a))

________________________________________________________________________________________

Mupad [B]
time = 0.49, size = 20, normalized size = 0.95 \begin {gather*} -\frac {4}{b\,\left ({\mathrm {tan}\left (\frac {a}{2}+\frac {b\,x}{2}\right )}^4-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)^3/cos(a + b*x)^2,x)

[Out]

-4/(b*(tan(a/2 + (b*x)/2)^4 - 1))

________________________________________________________________________________________